package com.zsrt.java.day20161226.zzd.demo3;

public class KongTuTest9 {
	public static void demo07(){
		int lay=4;
		for(int i=1;i<=lay;i++){
			for(int j=1;j<=lay-i;j++){
				System.out.print(" ");
			}
			for(int k=1;k<=2*i-1;k++){
				if(k==1||k==2*i-1){
					System.out.print("*");
				}else
					System.out.print(" ");
				}
				System.out.println();
			}
			for(int a=1;a<=lay-1;a++){
				for(int j=1;j<=a;j++){
					System.out.print(" ");
				}
				for(int k=1;k<=2*(lay-a)-1;k++){
					if(k==1||k==2*(lay-a)-1){
						System.out.print("*");
					}else
						System.out.print(" ");
					}
					System.out.println();
				}
	}
	public static void main(String[] args) {
		demo07();
	}

}
